package com.itgungnir.diyshuo.fragment.fenlei_fragment;

import android.support.v4.view.ViewPager;
import android.widget.RadioGroup;

import com.itgungnir.diyshuo.base.BaseFragment;

/**
 * 分类页面中对应MVP模式中Presenter层的类
 */
public class FenleiPresenter implements FenleiContract.Presenter {
    private FenleiContract.View view;
    private FenleiContract.Model model;

    public FenleiPresenter(FenleiContract.View view) {
        this.view = view;
        this.model = new FenleiModel();
    }

    @Override
    public void initDataForViewPager(BaseFragment fragment, ViewPager vp) {
        model.initDataForViewPager(fragment, vp);
    }

    @Override
    public void onRadioGroupCheckedChangeListener(int checkedId, ViewPager vp) {
        model.onRadioGroupCheckedChangeListener(checkedId, vp);
    }

    @Override
    public void onViewPagerPageChangedListener(int position, RadioGroup rg) {
        model.onViewPagerPageChangedListener(position, rg);
    }

    @Override
    public void onSearchClickedListener() {
    }
}